package com.lemeng.dao;

import com.lemeng.pojo.Sku;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

public interface SkuMapper extends Mapper<Sku> {

    @Update("update tb_sku set sale_num=sale_num+#{num} where id=#{skuId}")
    public void addSaleNum(@Param("skuId") String skuId,@Param("num") Integer num);

    @Update("update tb_sku set num=num-#{num} where id=#{skuId}")
    public void koujiankucun(@Param("skuId") String skuId,@Param("num") Integer num);

}
